﻿using System;
using Myotragus.Data.Emit;
using Myotragus.Store.Model.Tests.Domain;
using NUnit.Framework;

namespace Myotragus.Store.Model.Tests
{
  [TestFixture(typeof(ILoadEntityGenerator))]
  [TestFixture(typeof(ISaveEntityGenerator))]
  [TestFixture(typeof(IDefaultsSaveEntityGenerator))]
  [TestFixture(typeof(IDefaultsLoadEntityGenerator))]
  class OperationsEntityGeneratorsFixtures<TGenerator>
    where TGenerator : ITypeGenerator
  {
    [SetUp]
    public void SetUp()
    {
      FixtureHelper.InitializeServices();
    }

    [Test]
    public void CreateGenerator()
    {
      var gen = FixtureHelper.Container.Resolve<TGenerator>();
      var t = gen.GetImplementation(typeof(ILocalizableObject));

      FixtureHelper.PrintType(t);
      foreach (var ifs in t.GetInterfaces())
        Console.WriteLine(ifs);
    }
  }
}
